home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Word / Ae-An / Alpha.20.release.cpt / AlphaBits < prev    next >
Text File  |  1990-08-23  |  10KB  |  387 lines

  1.  
  2. ; Uncomment the following line if you have a foreign keyboard
  3. ; (set noRemapOption on)
  4.  
  5. ;====== Machine-independent portion =================================
  6.  
  7. (ascii 96  startEscape)
  8. (ascii 27  startEscape)
  9. (ascii 13         carriageReturn)
  10. (ascii 09          doTab)
  11.  
  12. (ascii 28  backwardChar)                ; left arrow
  13. (ascii 28 <z> beginningOfLine)
  14. (ascii 28 <s> backwardCharSelect)
  15. (ascii 28 <sz> beginningLineSelect)
  16.  
  17. (ascii 29  forwardChar)                ; right arrow
  18. (ascii 29 <z> endOfLine)
  19. (ascii 29 <s> forwardCharSelect)
  20. (ascii 29 <sz> endLineSelect)
  21.  
  22. (ascii 30  previousLine)                ; up arrow
  23. (ascii 30 <s> prevLineSelect)
  24. (ascii 30 <z> beginningOfBuffer)
  25. (ascii 30 <sz> beginningBufferSelect)
  26. (ascii 30 <c> scrollUpLine)
  27.  
  28. (ascii 31  nextLine)                    ; down arrow
  29. (ascii 31 <z> endOfBuffer)
  30. (ascii 31 <s> nextLineSelect)
  31. (ascii 31 <sz> endBufferSelect)
  32. (ascii 31 <c> scrollDownLine)
  33.  
  34. (bind 'a' <zo>    insertAscii)
  35. (bind 'a' <zos>    getAscii)
  36. (bind '`' startEscape)
  37. (bind 'l' <xz>    currentPosition)
  38. (bind 'l' <cz>    loadCmd)
  39. (bind 'f' <cz>     freeMem)
  40. (bind '}' <s>     electricRightBrace)
  41. (bind '{' <s>     electricLeftBrace)
  42. (bind ';'         doElectricSemi)
  43. (bind 'u' <x>     upcaseRegion)
  44. (bind 'd' <x>     downcaseRegion)
  45. (bind 'c' <x>     capitalizeRegion)
  46. (bind 'r' <x>     shiftRegionRight)
  47. (bind 'l' <x>     shiftRegionLeft)
  48. (bind 'r' <e>     repeatSearchBackward)
  49. (bind 's' <e>     repeatSearchForward)
  50. (bind '\0f' <z> repeatSearchBackward)
  51. (bind '\01' <z> repeatSearchForward)
  52. (bind '(' <sx>     startKeyboardMacro)
  53. (bind ')' <sx>     endKeyboardMacro)
  54. (bind 'e' <x>     executeKeyboardMacro)
  55. (bind 'n' <x>     nextWindow)
  56. (bind 'p' <x>     prevWindow)
  57. (bind 'x' <x>     exchangePointAndMark)
  58. (bind 'x' <zx>     exchangePointAndMark)
  59. (bind 'j' <e>    fillRegion)
  60. (bind 'p' <e>    fillParagraph)
  61. (bind 'b' <e>     backwardWord)
  62. (bind 'd' <e>     deleteWord)
  63. (bind 'f' <e>     forwardWord)
  64. (bind 'g' <e>     gotoLine)
  65. (bind 'h' <e>     backwardDeleteWord)
  66. (bind 'n' <e>     nextFunc)
  67. (bind '<' <se>     beginningOfBuffer)
  68. (bind '>' <se>     endOfBuffer)
  69. (bind 't' <e>     findTag)
  70. (bind 'k' <e>     keyCode)
  71.  
  72. (set numWinsToTile 2)
  73. (set electricSemi on)
  74. (set elecLBrace on)
  75. (set elecRBrace on)
  76. (set fontSize 9)
  77. (set defWidth 506)
  78. (set defHeight 600)            ; 336 for classic mac
  79. (set fullScreen on)
  80. (set startWithNew off)
  81. (set fillColumn 75)
  82. (set useBackupFolder on)
  83.  
  84. (set backupFolder "jpl341:Pete:back")
  85. (set currFileSet "edit")
  86. (set includePath "Hard Disk:C:THINK C:Mac #includes;Hard Disk:C:THINK C:C Libraries:headers;;")
  87. (set funcExpr "^[^ \t#]*(.*)$")
  88. (set tagFile "jpl341:Pete:cTAGS")
  89.  
  90. ; Example macros
  91. (define quoteLastWord
  92.     backwardWord
  93.     type "'"
  94.     forwardWord
  95.     type "'"
  96. )
  97.  
  98. (define normalLeftBracket
  99.     type "{"
  100. )
  101. (define normalRightBracket
  102.     type "}"
  103. )
  104. (define normalSemiColon
  105.     type ";"
  106. )
  107.  
  108. (define newBlock
  109.     type " "
  110.     electricLeftBrace
  111.     carriageReturn
  112.     electricRightBrace
  113.     previousLine
  114.     previousLine
  115.     endOfLine
  116. )
  117.  
  118. (define hiliteCurrWord
  119.     forwardWord
  120.     setMark
  121.     backwardWord
  122.     markHilite
  123. )
  124.  
  125. ; This macro is useful in finding the definition of a local variable.
  126. (define localDef
  127.     saveVars                    ; Save variables' values.
  128.     hiliteCurrWord
  129.     copyclip "word"                ; Copy selected text to clipboard 'word'
  130.     set forward off                ; Kludged search for beginning of proc.
  131.     set regExpr on
  132.     search "^{"
  133.     set forward on
  134.     set regExpr off
  135.     set matchWords on
  136.     clipsearch "word"            ; Use the contents of the clipboard 'word'
  137.                                 ; to search for our variable.
  138.     restoreVars                    ; Restore the variables' original values.
  139. )
  140.  
  141.  
  142. (define globalDef
  143.     saveVars
  144.     hiliteCurrWord
  145.     copyclip "word"
  146.     beginningOfBuffer
  147.     set forward on
  148.     set regExpr off
  149.     set matchWords on
  150.     clipsearch "word"
  151.     restoreVars)
  152.     
  153.     
  154. ; This macro is included as an example. I doubt it is too useful in and of
  155. ; itself :-).
  156. (define commentWord
  157.     mark "one"                    ; Save our inital position
  158.     hiliteCurrWord                ; Hilite the current word
  159.     backwardChar                ; This de-selects the word and moves the 
  160.                                 ; insertion point to the start. Deselecting
  161.                                 ; also always sets the mark at the end of the
  162.                                 ; selected text.
  163.     type "/* "
  164.     exchangePointAndMark        ; Move to what used to be the end of the word
  165.     3 forwardChar                ; and then adjust for our earlier typing.
  166.     type " */"
  167.     goto "one"                    ; Move to what used to be our original 
  168.     3 forwardChar)                ; position and then adjust for typing.
  169.     
  170.     
  171. (define commentLine
  172.     mark "one"
  173.     beginningOfLine
  174.     type "/* "
  175.     endOfLine
  176.     type " */"
  177.     goto "one"
  178.     3 forwardChar)
  179.  
  180. (define commentBox
  181.     acmd "Comment Box")
  182.  
  183. (define uncommentBox
  184.     set matchWords 0
  185.     set forward 0
  186.     set regExpr 0
  187.     set ignoreCase 1
  188.     search "/*"
  189.     beginningOfLine
  190.     mark "one"
  191.     set matchWords 0
  192.     set forward 1
  193.     set regExpr 0
  194.     set ignoreCase 1
  195.     search "*/"
  196.     endOfLine
  197.     nextLine
  198.     beginningOfLine
  199.     goto "one"
  200.     markHilite
  201.     acmd "UnComment Box"
  202. )
  203.  
  204. (define transposeWords
  205.     forwardWord
  206.     setMark
  207.     backwardWord
  208.     cut
  209.     deleteChar
  210.     forwardWord
  211.     type " "
  212.     paste
  213. )
  214.  
  215. (define transposeChars
  216.     setMark
  217.     forwardChar
  218.     cut
  219.     backwardChar
  220.     yank
  221.     forwardChar
  222. )
  223.  
  224. (bind 'c' <zc>    commentBox)
  225. (bind 'u' <zc>    uncommentBox)
  226. (bind ''' <z>    quoteLastWord)
  227. (bind '{' <zs>  normalLeftBracket)
  228. (bind '}' <zs>  normalRightBracket)
  229. (bind ';' <z>   normalSemiColon)
  230. (bind '{' <se>  newBlock)
  231. (bind 'h' <z> hiliteCurrWord)
  232.  
  233. (bind '\56'  backwardWord)                ; Keypad 4
  234. (bind '\56' <c> backwardDeleteWord)
  235. (bind '\58'  forwardWord)                ; Keypad 6
  236. (bind '\58' <c> deleteWord)
  237. (bind '\47'  insertToTop)                ; Keypad Clear
  238. ; Never bind Keypad /
  239. ; Never bind Keypad *
  240. (bind '\52'  pageBack)                    ; Keypad 0
  241. (bind '\4c'  pageForward)                ; Keypad Enter
  242. (bind '\55'  repeatSearchForward)        ; Keypad 3
  243. (bind '\53'  repeatSearchBackward)    ; Keypad 1
  244. (bind '\53' <c> prevFunc)                ; ^Keypad 1
  245. (bind '\55' <c> nextFunc)                ; ^Keypad 3
  246. (bind '\54'  winSearch)                    ; Keypad 2
  247. (bind '\41'  endOfBuffer)                ; Keypad .
  248. (bind '\57'  exchangePointAndMark)    ; Keypad 5
  249. (bind '\59'  backwardDeleteWord)        ; Keypad 7
  250. (bind '\5c'  deleteWord)                ; Keypad 9
  251.  
  252.  
  253. ;====== Machine-dependent portion =================================
  254.  
  255. ; #define    OLDMAC
  256. #ifdef    OLDMAC
  257.  
  258. (bind 's' <o>     winSearch)                
  259. (bind 'a' <o>     beginningOfLine)        
  260. (bind 'b' <o>     backwardChar)            
  261. (bind 'd' <o>     deleteChar)            
  262. (bind 'f' <o>     forwardChar)            
  263. (bind 'e' <o>     endOfLine)            
  264. (bind 'g' <o>     abortEm)                
  265. (bind 'k' <o>     killLine)                
  266. (bind 'l' <o>     insertToTop)            
  267. (bind 'p' <o>     previousLine)            
  268. (bind 'n' <o>     nextLine)                
  269. (bind 'o' <o>     openLine)                
  270. (bind 'u' <o>     iterationCount)        
  271. (bind 'v' <o>     pageForward)            
  272. (bind 'z' <o>     pageBack)                
  273. (bind 'v' <e>     pageBack)
  274. (bind 'w' <o>     cut)                
  275. (bind 'w' <e>     copy)
  276. (bind ' ' <o>     setMark)                
  277. (bind 'x' <o>     prefixChar)            
  278. (bind 'y' <o>     yank)                    
  279.  
  280.  
  281. (bind '\35'  startEscape)                ; 'esc' key
  282.  
  283. #else OLDMAC
  284.  
  285. (bind 's' <z>     winSearch)                
  286. (bind 'a' <z>     beginningOfLine)        
  287. (bind 'b' <z>     backwardChar)            
  288. (bind 'd' <z>     deleteChar)            
  289. (bind 'f' <z>     forwardChar)            
  290. (bind 'e' <z>     endOfLine)            
  291. (bind 'g' <z>     abortEm)                
  292. (bind 'k' <z>     killLine)                
  293. (bind 'l' <z>     insertToTop)            
  294. (bind 'p' <z>     previousLine)            
  295. (bind 'n' <z>     nextLine)                
  296. (bind 'o' <z>     openLine)                
  297. (bind 'u' <z>     iterationCount)        
  298. (bind 'v' <z>     pageForward)            
  299. (bind 'z' <z>     pageBack)                
  300. (bind 'v' <e>     pageBack)
  301. (bind 'w' <z>     cut)                
  302. (bind 'w' <e>     copy)
  303. (bind ' ' <z>     setMark)                
  304. (bind 'x' <z>     prefixChar)            
  305. (bind 'y' <z>     yank)                    
  306.  
  307. (bind '\7a'  undo)                        ; F1
  308. (bind '\78'  cut)                        ; F2
  309. (bind '\63'  copy)                        ; F3
  310. (bind '\76'  yank)                        ; F4
  311.  
  312. (bind '\60'  nextWindow)                ; F5
  313. (bind '\61'  findFile)                    ; F6
  314. (bind '\62'  doSave)                    ; F7
  315. (bind '\64'  killWindow)                ; F8
  316.  
  317. (bind '\65'  winSearch)                    ; F9
  318. (bind '\6d'  repeatSearchBackward)    ; F10
  319. (bind '\67'  repeatSearchForward)        ; F11
  320. (bind '\6f'  yank)                        ; F12
  321.  
  322. (bind '\69'  startKeyboardMacro)        ; F13
  323. (bind '\6b'  endKeyboardMacro)            ; F14
  324. (bind '\71'  executeKeyboardMacro)        ; F15
  325.  
  326. (bind '\35'  startEscape)                ; 'esc' key
  327. (bind '\75'  deleteChar)                ; 'del' key
  328. (bind '\72'  getHelp)                    ; 'help' key
  329. (bind '\73'  beginningOfBuffer)        ; 'home'
  330. (bind '\77'  endOfBuffer)                ; 'end'
  331. (bind '\74'  pageBack)                    ; 'page up'
  332. (bind '\79'  pageForward)                 ; 'page down'
  333.  
  334. #endif    OLDMAC
  335.  
  336. (menu    "keyAscii"
  337.         "getAscii"
  338.         "insertAscii"
  339.         "(-"
  340.         "/-commentBox"
  341.         "/=uncommentBox"
  342.         "(-"
  343.         "transposeChars"
  344.         "transposeWords")
  345.         
  346.  
  347. ; Obviously, you won't want to use these same file sets, but they are an example.
  348. (fileSet edit1
  349.     "jpl341:Pete:Alpha.101:EditSource:bindings.c"
  350.     "jpl341:Pete:Alpha.101:EditSource:center.c")
  351.     
  352. (fileSet edit
  353.     "jpl341:Pete:Alpha.101:EditSource:bindings.c"
  354.     "jpl341:Pete:Alpha.101:EditSource:center.c"
  355.     "jpl341:Pete:Alpha.101:EditSource:dir.c"
  356.     "jpl341:Pete:Alpha.101:EditSource:emacs.c"
  357.     "jpl341:Pete:Alpha.101:EditSource:file_set.c"
  358.     "jpl341:Pete:Alpha.101:EditSource:frills.c"
  359.     "jpl341:Pete:Alpha.101:EditSource:io.c"
  360.     "jpl341:Pete:Alpha.101:EditSource:key.c"
  361.     "jpl341:Pete:Alpha.101:EditSource:main.c"
  362.     "jpl341:Pete:Alpha.101:EditSource:misc.c"
  363.     "jpl341:Pete:Alpha.101:EditSource:search.c"
  364.     "jpl341:Pete:Alpha.101:EditSource:settings.c"
  365.     "jpl341:Pete:Alpha.101:EditSource:text.c"
  366.     "jpl341:Pete:Alpha.101:EditSource:undo.c"
  367.     "jpl341:Pete:Alpha.101:EditSource:windows.c")
  368.  
  369. (fileSet includes
  370.     "jpl341:Pete:Alpha.101:THINK C:Mac #includes:ColorToolBox.h"
  371.     "jpl341:Pete:Alpha.101:THINK C:Mac #includes:FileMgr.h"
  372.     "jpl341:Pete:Alpha.101:THINK C:Mac #includes:PrintTraps.h"
  373.     "jpl341:Pete:Alpha.101:THINK C:Mac #includes:ScrapMgr.h"
  374.     "jpl341:Pete:Alpha.101:THINK C:Mac #includes:pascal.h"
  375.     "jpl341:Pete:Alpha.101:THINK C:Mac #includes:HFS.h"
  376.     "jpl341:Pete:Alpha.101:THINK C:Mac #includes:ScriptMgr.h"
  377.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:string.h"
  378.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:stdio.h"
  379.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:unix.h"
  380.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:stddef.h"
  381.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:math.h"
  382.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:errno.h"
  383.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:stdlib.h"
  384.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:ctype.h"
  385.     "jpl341:Pete:Alpha.101:THINK C:C Libraries:headers:stdarg.h")
  386.  
  387.